Skip to content

harness.layout · libraries - #45

Merged
JaimeStill merged 5 commits into
mainfrom
libraries
Nov 29, 2026
Merged

JaimeStill merged 5 commits into
mainfrom
libraries

Conversation

@JaimeStill

Copy link
Copy Markdown
Contributor

harness.layout · task 10/17 · libraries

Summary

  • go-database, go-web-sdk, go-observability, go-storage and go-cli-sdk take the agent-separation
    layout: .agent/, mise.agent.toml, MISE_ENV=agent in the Claude settings, .agent/state/
    ignored, and the check run as step scripts in scripts/check/.
  • A person's mise tasks lists only check, currency, upgrade, fmt, tidy, plus each
    repository's suite and container tasks. The agent profile adds check:go, check:lints,
    test, vet, lint. build is gone, since none ships a command.
  • Every unit test sits in its package's test/ directory. go-database's hook tests stay beside
    export_test.go, with shared fixtures in internal/admintest and internal/sweeptest.
  • All five run the shared scripts/currency.sh and are current: go-core v0.14.0, marathon
    0.25.0, mise-action v5.4.0, SeaweedFS 4.55, the S3 SDK patches, and rate-limit on go-web-sdk
    v0.20.0.
  • Each merge waits on CI through [remote] checks.

Core changes

  1. The shared currency script in all five: byte-identical with go-core's. Why: upgrade
    now moves action and image pins and honors HOLDS everywhere. go-web-sdk's draft-revision
    check is its own script, which mise-tasks/currency runs after the shared one.
  2. Tests in <pkg>/test/: 86 test files moved with git mv. go test -list names are
    identical before and after, with and without -tags integration.
  3. go-database hooks: admin/ready_test.go (3 tests) and sweep/handle_test.go (22 tests)
    stay beside export_test.go; the rest moved, with fixtures hoisted into
    internal/admintest and internal/sweeptest.
  4. go-storage s3.Put: transfermanager v0.5.12+ joins its own abort error into the upload
    error, abort first, so Put drops that abort error to keep its classification.
    TestPut_FailedAbortIsRepeated fails without the change.
    func withoutAbortFailure(err error) error // drops the AbortMultipartUpload OperationError

Verify

mise run check: ✓ exit 0 in all five, git status --porcelain --ignored empty afterwards

  1. In each repository, mise tasks → check currency fmt tidy upgrade, plus
    acceptance db:down db:up integration in go-database and
    acceptance acceptance:azureblob acceptance:s3 down up in go-storage.
  2. MISE_ENV=agent mise tasks → adds check:go check:lints lint test vet.
  3. mise run currency → exit 0, nothing reported, in all five.
  4. cmp scripts/currency.sh ../go-core/scripts/currency.sh → no output, in all five.
  5. In go-database, mise run acceptance → PostgreSQL starts, ok .../postgres/pgvector/test,
    the stack stops, exit 0.
  6. In go-storage, mise run acceptance → SeaweedFS and Azurite start, ok .../s3/test and
    ok .../azureblob/test, 0 skipped, exit 0.

Decided without you

  1. The sub-modules that require go-core only indirectly (go-database's postgres and pgvector,
    go-observability's otlp, go-storage's s3 and azureblob) also moved to v0.14.0, so every
    module resolves one go-core and each changelog's Breaking entry is true.
  2. go-storage's s3.Put drops transfermanager's joined abort error (Core change 4). The error
    text changes to multipart upload <id>: … but classification doesn't. No changelog entry,
    since the s3 changelog never records error text.
  3. go-storage's acceptance is mise-tasks/acceptance/_default, so it can sit beside
    acceptance/s3 and acceptance/azureblob.
  4. The sweep and admin fixtures: Reports renamed from passes, and a Budgets() accessor
    replaces direct field reads now that the fixtures live in another package.
  5. Dropped decision "core: go-cli-sdk and go-observability take the shared
    scripts/currency.sh … in libraries": both run it, and their changelogs say so.

Redirects and escalations

none

Merge danger: two-way door · blast radius: five libraries' tests, tasks and docs, and s3
Put's error chain; no tag, no exported API change · go-database, go-web-sdk, go-observability,
go-storage, go-cli-sdk: merge waits on CI; claude-plugins: merge waits on CI

Needs you: none

… in checks

- mise run upgrade moved the marathon pin 0.24.0 -> 0.25.0, the base
  module's go-core requirement v0.12.0 -> v0.14.0, and jdx/mise-action
  v5.3.0 -> v5.4.0 in ci.yml. Nothing here calls EventKind.Raise, the
  only break between them.
- The postgres and postgres/pgvector sub-modules reach go-core only
  through the tagged go-database v0.13.0, so their indirect requirement
  is raised to v0.14.0 with go get, keeping every module on one go-core
  and making each changelog's breaking entry true for its importers.
- .claude/marathon.toml moves the CI wait into [remote] checks; merge
  only merges, as marathon 0.23.0 splits them.
- Each module's changelog records the go-core v0.14.0 requirement under
  [Unreleased] as breaking for importers; the marathon pin takes no entry.
- .agent/mise-tasks holds the agent tasks (check:go, check:lints, test, vet,
  lint), loaded only by mise.agent.toml under MISE_ENV=agent, which
  .claude/settings.json sets; the inline build, test, vet and lint go.
- check, tidy, integration and acceptance become file tasks in mise-tasks/,
  keeping their behavior (acceptance keeps its trap, logs and db:down);
  db:up and db:down stay inline.
- scripts/check/go.sh and lints.sh are sqlate's, keeping -tags integration
  for vet, fix and lint; the check runs them in order.
- .gitignore lists .agent/state/ in place of .claude/briefs/.
- STANDARDS.md points to agent-separation.md, worded as go-core's.
- CI is unchanged: it runs mise run check, with no path filters.
The 14 test files outside admin/export_test.go and sweep/export_test.go
move with git mv into <pkg>/test/ across the three modules (the root
package's into test/), pgvector's two integration-tagged live tests and
postgres's TestMain included. go test -list reports the same names before
and after: 113 in the root module, 9 in postgres and 2 in
postgres/pgvector, and 113, 9 and 5 with -tags integration; mise run
acceptance runs pgvector's live tests from their new place.

admin's three TestReady_* tests that use the SetProbe and ExpireThrottle
hooks stay beside export_test.go, in admin/ready_test.go, with
behindService. The fixtures both admin test packages use (Migrations,
Exists, History, Applied, Clean, Dialect, Registry, Started, and New and
NewService, which build a service on a scripted pool) are hoisted into
internal/admintest; admin/test keeps its fixture struct, whose builders
wrap admintest.New.

sweep's 22 tests that use the SetClock and Handle hooks (every
TestHandle_* and TestSweeper_AYieldingCycleNudgesTheReactor) stay beside
export_test.go, in sweep/handle_test.go, with t0, clock, endless and
gateLog; the other 8 move to sweep/test. The scripted reclaimer, the pass
reports, the log capture, the waiting gate, the fixture and its builders,
the lock responses and checks, Await and Shutdown are hoisted into
internal/sweeptest. The reclaimer's budgets are read through a Budgets
method, and the passes recorder is named Reports beside the reclaimer's
Passes method.

testpackage was already narrowed to export_test\.go; no test reads a
fixture file.
The README's Development section lists a person's tasks as mise tasks
shows them without MISE_ENV (fmt and tidy join), says the check runs the
step scripts in scripts/check/, names the agent profile and the tasks it
adds, and places the tests: each package's test/, the export_test.go
hook tests of admin and sweep beside it, and the shared fixtures in
internal/admintest and internal/sweeptest.

Each module's CHANGELOG records the layout move under [Unreleased] with
no API change; the root's also records the step scripts and the agent
profile. The currency script was already the shared one, so it takes no
entry. CLAUDE.md and the doc.go files describe none of these and are
unchanged.
@JaimeStill
JaimeStill merged commit bc057e3 into main Nov 29, 2026
1 check passed
@JaimeStill
JaimeStill deleted the libraries branch November 29, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant